Orienting ship movement in asteroids [closed]

Posted by BadSniper on Game Development See other posts from Game Development or by BadSniper
Published on 2012-10-26T20:09:38Z Indexed on 2012/10/27 5:18 UTC
Read the original article Hit count: 139

Filed under:
|
|
|

Possible Duplicate:
Move sprite in the direction it is facing?

I'm programming asteroids game. I'm trying to give velocity in the direction of ship face. I've tried using velocity.x = velocity.x * cos r, velocity.y = velocity.y * sin r where velocity is a vector and r is the angle rotated.

but it's not moving in right direction. Could someone help with this problem? It is supposed to return the vector in which ship is facing. I don't understand the problem.

© Game Development or respective owner

Related posts about opengl

Related posts about math